#!/bin/sh
echo $1
mkdir -p out
pdfseparate $1 out/out-%d.pdf
for fp in $(ls out/out-*.pdf)
do
	rf=`pdftotext $fp - | grep -A 2 ASSU | tail -n 1`
	mv "$fp" "out/$rf.pdf"
	
done
zn=buste_`date +%Y%m%d_%H%M%S`.zip
zip -mr "$zn" out
